<php>
	$this->display(tpl('head',true));
</php>
<style>
	.layui-table thead tr th{
		text-align: center;
	}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  	<legend>短信平台管理</legend>
</fieldset>
<table class="layui-table" cellspacing="0" cellpadding="0" border="0"  lay-filter="demoEvent">
	<thead>
		<tr>
			<th width="100">平台名称</th>
			<th>平台描述</th>
			<th width="100">版本</th>
			<th width="100">状态</th>
			
			<th width="130">操作</th>
		</tr>
	</thead>
	<tbody>
		<foreach array="data">
		<tr>
			<td align="center">{{$row['name']}}</td>
			<td>{{$row['description']}}</td>
			<td align="center">{{$row['version']}}</td>
			<td align="center">
				<if condition="$row['is_default']">
					<span  class="layui-btn layui-btn-primary layui-btn-sm">已默认</span>
				<else>
					<a href="{{admin_plugin_url}}index/setdefault/id_{{$row['id']}}" class="layui-btn layui-btn-danger layui-btn-sm" >设置为默认</a>
				</if>
			</td>
			<td align="center">
				<if condition="!$row['is_install']">
					<a class="layui-btn layui-btn-sm layui-btn-warm" href="{{admin_plugin_url}}index/install/dir_{{$row['initial_name']}}">安装</a>
				<else>
				<a class="layui-btn layui-btn-sm layui-btn-warm" href="{{admin_plugin_url}}index/edit/id_{{$row['id']}}">设置</a>
				<a class="layui-btn layui-btn-sm layui-btn-danger" href="{{admin_plugin_url}}index/uninstall/id_{{$row['id']}}">卸载</a>
				</if>
			</td>
		</tr>
		</foreach>
	</tbody>
</table>
<php>
	$this->display(tpl('foot',true));
</php>
